pkg_bz2_one_prj:
	$(show)                                                              ; \
	$(make_cmd) prj_clean                                                ; \
	tar_dvp=$(HOME)/.tenacitas.tar.bz2/tenacitas/cpp                     ; \
        cp -fr $(dir_prj) "$$tar_dvp"/prj/tenacitas  2> /dev/null            ; \
	cp -fr $(dir_cfg) "$$tar_dvp"/code/etc 2> /dev/null                  ; \
	cp -fr $(dir_doc) "$$tar_dvp"/code/doc 2> /dev/null                  ; \
	cp -fr $(dir_inc) "$$tar_dvp"/code/include 2> /dev/null              ; \
	cp -fr $(dir_inp) "$$tar_dvp"/code/input 2> /dev/null                ; \
	cp -fr $(dir_log) "$$tar_dvp"/code/log 2> /dev/null                  ; \
	cp -fr $(dir_out) "$$tar_dvp"/code/out 2> /dev/null                  ; \
	cp -fr $(dir_src) "$$tar_dvp"/code/src 2> /dev/null                  ; \
	cp -fr $(dir_tst) "$$tar_dvp"/code/test 2> /dev/null                 ; \
	cp -fr $(dir_tmp) "$$tar_dvp"/code/tmp 2> /dev/null                  ; 



#cd $(dir_dvp)/tool/gmake                                           ; \
#	$(make_cmd) project=$(project) prj_clean                             ; \




#@public@|pkg_bz2|Creates a tar-bzip file with all necessary to build a project
#@public_detailed@|pkg_bz2|Syntax: make project=<project-name> pkg_bz2
#@public_detailed@|pkg_bz2|Bzips all the files necessary by the project informed, as well as the files of all the projects this project depends on, and all the 'tool' directory
#@public_detailed@|pkg_bz2|The bz2 file is located at $(HOME)/tenacitas.build_system.tar.bz2
pkg_bz2: 
	$(show) "********************************************* "             ; \
	echo "Creating tar.bz2 file for project $(project) "                 ; \
	tar_dvp=$(HOME)/.tenacitas.tar.bz2/tenacitas/cpp                     ; \
	rm -rf "$$tar_dvp"  2> /dev/null                                     ; \
	mkdir -p "$$tar_dvp"   2> /dev/null                                  ; \
	build_system="$(dir_dvp)/prj/tenacitas/build_system"                 ; \
	mkdir -p "$$tar_dvp/prj/tenacitas/" 2> /dev/null                     ; \
	cp -r $$build_system "$$tar_dvp/prj/tenacitas" 2> /dev/null          ; \
        mkdir -p "$$tar_dvp"/code   2> /dev/null                             ; \
        cd $(dir_code)   2> /dev/null                                        ; \
        ls | while read dir; do                                                \
                mkdir -p "$$tar_dvp/code/$$dir"                              ; \
        done                                                                 ; \
        cd -                                                                 ; \
	$(make_cmd) chain chain_target=pkg_bz2_one_prj                       ; \
	$(make_cmd) pkg_bz2_one_prj                                          ; \
	for s in `find "$$tar_dvp" -name ".svn"` ; do                          \
		rm -rf "$$s" 2> /dev/null                                    ; \
	done                                                                 ; \
	cd "$$tar_dvp"                                                       ; \
	cd ..                                                                ; \
	cd ..                                                                ; \
	tar cvjf $(HOME)/tenacitas.tar.bz2 tenacitas 2> /dev/null            ; \
	rm -rf $(HOME)/.tenacitas.tar.bz2  2> /dev/null                      ;